﻿using System;
using System.Data.SqlClient;


namespace _net_ex5
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = @"Server=.\SQLEXPRESS;Database=database1;Trusted_Connection=True;";
            using (SqlConnection conn = new SqlConnection(connectionString)) {
                conn.Open();
                Console.WriteLine("Connected");

            
                string query = "insert into Book_info(ISBN,Bookname) values( '{0}' ,'{1}' );";
                query = string.Format(query,"978-7-04-040664-9","DB");
                Console.WriteLine(query);
                SqlCommand command = new SqlCommand(query,conn);
                command.CommandText = query;
                int result = command.ExecuteNonQuery();
                Console.WriteLine(result);

                
             
                

            }
            

        }
    }
}
